<template>
  <el-table
    :data="tableData"
    stripe
    style="width: 100%; height: 400px; overfle: auto"
  >
    <el-table-column prop="name" label="Name" width="180"> </el-table-column>
    <el-table-column prop="age" label="Age" width="180"> </el-table-column>
    <el-table-column prop="address" label="地址"> </el-table-column>
  </el-table>
</template>
<script>
import instance from "../request/api.js";
export default {
  name: "Forms",
  data() {
    return {
      tableData: null,
    };
  },
  methods: {
    async fn() {
      let { data } = await instance.get("http://localhost:3000/tableData");
      this.tableData = data;
    },
  },
  created() {
    this.fn();
  },
};
</script>
<style scoped>
</style>
